import axios from 'axios'
export const FillProgressService = class FillProgressService {
    static fillProgressService = null

    static getInstance() {
        if (this.fillProgressService == null) {
            this.fillProgressService = new FillProgressService()
        }
        return this.fillProgressService
    }


    save(progress){  //提交计划
        var params={}
        params.outputProgressPlan=progress
        return axios.post('http://localhost/fillProgress',params.outputProgressPlan)
    }

    saveBeach(OutputProgressPlanSubs){//批量提交子目

        var OutputProgressPlanSub={}
        OutputProgressPlanSubs.forEach(item=>{
            OutputProgressPlanSub=item
        })
        return axios.post(
            'http://localhost/fillProgress/fillProgressSub',OutputProgressPlanSub)

    }

    list(params){//查询进度计划
        return axios.get(
            'http://localhost/fillProgress',{params})
    }
}